package com.grocery.dao;

import com.grocery.bean.Cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

@Mapper
public interface CartDao {
    int add(@Param("productid") int productid,@Param("userid") int userid,@Param("number") int number);
    int delete(@Param("productid") int productid,@Param("userid") int userid);
    int update(@Param("productid") int productid,@Param("userid") int userid,@Param("number") int number);
    List<Cart> getcartData(@Param("userid") int userid);
    Cart getcartBypid(@Param("productid") int productid, @Param("userid") int userid);
}
